package com.crop.back.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 产品表
 * </p>
 *
 * @author 作者
 * @since 2025-01-20
 */
@Getter
@Setter
@TableName("product")
@ApiModel(value = "Product对象", description = "产品表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("供应商ID")
    @TableField("supplier_id")
    private Long supplierId;

    @ApiModelProperty("产品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("产品分类ID")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty("产品图片")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty("品种")
    @TableField("variety")
    private String variety;

    @ApiModelProperty("规格")
    @TableField("specification")
    private String specification;

    @ApiModelProperty("种植/养殖方式")
    @TableField("cultivation_method")
    private String cultivationMethod;

    @ApiModelProperty("产品描述")
    @TableField("description")
    private String description;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("deleted")
    private Integer deleted;


}
